package registnet.records;

import java.util.List;
import java.util.Vector;

public class Section {

	private ICourse course;
	private String sectionName;
	private List<Student> students = new Vector<Student>();
	private List<Employee> teachers = new Vector<Employee>();
	
	
	/**
	 * Constructs a section with the given paramters
	 * 
	 * @param course - The course in which the section is created from
	 * @param sectionName - The section name
	 */
	public Section(ICourse course, String sectionName){
		this.course = course;
		this.sectionName = sectionName;
	}
	
	
	/**
	 * Constructs a section with the given paramters
	 * 
	 * @param sectionName - The section name
	 */
	public Section(String sectionName){
		this.sectionName = sectionName;
	}
	
	
	/**
	 * Gets the course that uses/used the section
	 * 
	 * @return	The course that uses/used the section
	 */
	public ICourse getCourse() {
		return course;
	}
	
	
	/**
	 * Sets the course that uses/used the section
	 * 
	 * @param course - The course that uses/used the section
	 */
	public void setCourse(ICourse course) {
		this.course = course;
	}
	
	
	/**
	 * Gets the name of the section
	 * 
	 * @return	The name of the section
	 */
	public String getSectionName() {
		return sectionName;
	}
	
	
	/**
	 * Sets the name of the section
	 * 
	 * @param sectionName - The name of the section
	 */
	public void setSectionName(String sectionName) {
		this.sectionName = sectionName;
	}
	
	
	/**
	 * Gets the students enlisted into the section
	 * 
	 * @return	List of students enlisted into the section
	 */
	public List<Student> getStudents() {
		return students;
	}
	
	
	/**
	 * Adds the student into the section
	 * 
	 * @param student - The student to be added into the section
	 */
	public void addStudent(Student student) {
		this.students.add(student);
	}
	
	
	/**
	 * Gets the teachers assigned to the section
	 * 
	 * @return	List of teachers assigned to the section
	 */
	public List<Employee> getTeachers() {
		return teachers;
	}
	
	
	/**
	 * Assigns the teacher into the section 
	 * 
	 * @param teachers
	 */
	public void addTeacher(Employee teacher) {
		this.teachers.add(teacher);
	}
	
}
